package joc.nextgen.dbi;

import static joc.nextgen.JOC.result;
import joc.nextgen.dbi.JOC.PostCondition;

public class RicherTimeOfDayContract extends RicherTimeOfDay {
	@Override
	public int nearestHour() {
		new PostCondition() {
			{
				if (getMinute() < 30) {
					assert result(int.class) == getHour();
				} else if (getHour() < 23) {
					assert result(int.class) == getHour() + 1;
				} else {
					assert result(int.class) == 0;
				}
			}
		};
		return 0;
	}
}
